﻿using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
using WMS.Model;
using WMS.Repository.IRepository;

namespace WMS.Service.IService
{
    public interface IUserService
    {
        /// <summary>
        /// 分页查询用户列表
        /// </summary>
        Task<PageResult<UserWithAvatarDto>> GetUserPagedListAsync(UserQueryRequest request);

        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="account"></param>
        /// <param name="password"></param>
        /// <param name="realname"></param>
        /// <returns></returns>
        public Task<(bool Success, string Message)> AddUserAsync(AddUserModelDto user);
        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="account"></param>
        /// <param name="password"></param>
        /// <param name="realname"></param>
        /// <returns></returns>
        public Task<(bool Success, string Message)> UpdateUserAsync(UpdateUserModelDto user, IFormFile file);
        
        /// <summary>
        /// 启用停用用户
        /// </summary>
        /// <param name="id"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        public Task<(bool Success, string Message)> UpdateUserStatusAsync(long userId);

        /// <summary>
        /// 批量启用停用用户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task<(bool Success, string Message)> UpdateUsersStatusAsync(List<long> ids);

        /// <summary>
        /// 获取用户下拉框
        /// </summary>
        /// <returns></returns>
        Task<object> GetUserDropdownBoxAsync();

        Task<(bool Success, string Message)> UpdateUserPwdAsync(long id, string password,string newPassword);

    }
}
